import 'package:flutter/material.dart';

class ContainerCase2 extends StatelessWidget {
  const ContainerCase2({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity, // 100%
      height: double.infinity, // 100%
      color: Colors.black,
      alignment: Alignment.center, // 想要子元素不撑满需要给对齐方式
      child: Container(
        width: 300,
        height: 300,
        color: Colors.orange,
      ),
    );
  }
}
